package com.zatech.cgnci.project.controller;


import com.zatech.cgnci.project.dto.CgnciOperationLogsDTO;
import com.zatech.cgnci.project.service.CgnciOperationLogsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 操作日志表 前端控制器
 * </p>
 *
 * @author Generator
 * @since 2025-01-09
 */
@RestController
@RequestMapping("/api/operationLog")
@Api(produces = "application/json", tags = "操作日志管理api接口文档")
@RequiredArgsConstructor
public class CgnciOperationLogsController {
    
    private final CgnciOperationLogsService cgnciOperationLogsService;
    
    @GetMapping("/query")
    @ApiOperation(value = "根据业务号和业务类型查询操作日志")
    @ApiImplicitParams(value = {
           @ApiImplicitParam(name = "bizNo", value = "业务号", required = true), 
           @ApiImplicitParam(name = "bizType", value = "业务场景类型（businessScenarios）", required = true) 
    })
    public List<CgnciOperationLogsDTO> queryByBizNo(@RequestParam("bizNo") String bizNo, 
                                                    @RequestParam("bizType") String bizType){
        return cgnciOperationLogsService.queryByBizNo(bizNo,bizType);
    }

}

